let Koa=require("koa");
let router=require("koa-router")();
let views=require("koa-views");
let nunjucks=require("nunjucks");
let app=new Koa();

app.use(views(__dirname+"/p",{
    map:{html:"nunjucks"}
}))
app.listen(3000);
router.get("/",async ctx=>{
    await ctx.render("index")
})
router.get("/data",async ctx=>{
    ctx.body="hello world"
})
app.use(router.routes());
